using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class rigidBody : MonoBehaviour
{
    private Rigidbody _rigidbody;
    private Vector3 dirRight = Vector3.right;
    private Vector3 dirUp = Vector3.up;
    private float rightSpeed = 5.5f;
    private float upSpeed = 13.0f;

    // Start is called before the first frame update
    void Start()
    {
        _rigidbody = GetComponent<Rigidbody>();
        _rigidbody.velocity = dirRight * rightSpeed + dirUp * upSpeed;
    }

    // Update is called once per frame
    void Update()
    {
        if(transform.position.x > 9.0f)
        {
            transform.position = new Vector3(9.0f, -3.0f, 1);
        }
    }
}
